package Message.Public
{
    import Engine.RMI.*;
    import Framework.Serialize.*;

    public class EBusinessStatus extends Object
    {
        public var __value:int;
        private static var __values:Array = [];
        public static const _EBusinessStatusFail:int = 0;
        public static const EBusinessStatusFail:EBusinessStatus = new EBusinessStatus(_EBusinessStatusFail);
        public static const _EBusinessStatusStart:int = 1;
        public static const EBusinessStatusStart:EBusinessStatus = new EBusinessStatus(_EBusinessStatusStart);
        public static const _EBusinessStatusAgree:int = 2;
        public static const EBusinessStatusAgree:EBusinessStatus = new EBusinessStatus(_EBusinessStatusAgree);
        public static const _EBusinessStatusLocked:int = 3;
        public static const EBusinessStatusLocked:EBusinessStatus = new EBusinessStatus(_EBusinessStatusLocked);
        public static const _EBusinessStatusConfirm:int = 4;
        public static const EBusinessStatusConfirm:EBusinessStatus = new EBusinessStatus(_EBusinessStatusConfirm);
        public static const _EBusinessStatusSuccess:int = 5;
        public static const EBusinessStatusSuccess:EBusinessStatus = new EBusinessStatus(_EBusinessStatusSuccess);
        public static const _EBusinessStatusDeduct:int = 6;
        public static const EBusinessStatusDeduct:EBusinessStatus = new EBusinessStatus(_EBusinessStatusDeduct);

        public function EBusinessStatus(param1:int)
        {
            this.__value = param1;
            __values[param1] = this;
            
        }

        public function value() : int
        {
            return this.__value;
        }

        public function equals(param1:Object) : Boolean
        {
            if (param1 == this)
            {
                return true;
            }
            var _loc_2:* = param1 as ERMICallModel;
            if (_loc_2 == null)
            {
                return false;
            }
            return this.__value == _loc_2.value();
        }

        public function hashCode() : int
        {
            return 5 * this.__value;
        }

        public function __write(param1:SerializeStream) : void
        {
            param1.writeByte(this.__value);
            
        }

        public static function convert(param1:int) : EBusinessStatus
        {
            return __values[param1];
        }

        public static function __read(param1:SerializeStream) : EBusinessStatus
        {
            var _loc_2:* = param1.readByte();
            if (_loc_2 < 0 || _loc_2 >= 7)
            {
                throw new MarshalException();
            }
            return EBusinessStatus.convert(_loc_2);
        }

    }
}
